package com.csun.cmny.provider.model.dto;

import com.csun.cmny.base.dto.BaseQuery;
import com.csun.cmny.provider.validator.OmcCMFoodValidator;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class OmcCMFoodDto extends BaseQuery implements Serializable {

    /**
     * id
     */
    private Long id;

    /**
     * 老人id
     */
    @NotNull(message = "{CMOldman.id.null}", groups = {OmcCMFoodValidator.class})
    private Integer oldmanId;

    /**
     * 老人姓名
     */
    private String oldmanName;

    /**
     * 楼栋号
     */
    private String buildingNo;

    /**
     * 房间号
     */
    private String roomNo;

    /**
     * 床位号
     */
    private String bedNo;

    /**
     * 食品名称及数量
     */
    @NotNull(message = "{CMOldman.food.null}", groups = {OmcCMFoodValidator.class})
    private String foodDetail;

    /**
     * 食物照片
     */
    private String imageCode;

    /**
     * 到期时间
     */
    @NotNull(message = "{CMOldman.food.expireDate.null}", groups = {OmcCMFoodValidator.class})
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expireDate;

    /**
     * 是否放入冰箱(0-否 1-是)
     */
    private Boolean isRefrigerated;

    /**
     * 家人处置意见(0-无 1-丢弃 2-带回)
     */
    private Integer familyDisposition;

    /**
     * 备注
     */
    private String remark;

    /**
     * 家属签名
     */
    @NotNull(message = "{CMOldman.familySignature.null}", groups = {OmcCMFoodValidator.class})
    private String familySignature;

    //开始查询时间
    private String startQueryTime;

    //结束查询时间
    private String endQueryTime;
}
